package cn.cs.service;

import cn.cs.mapper.AgentProductOrderMapper;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@RestController
public class AgentProductOrderService {
    @Resource
    private AgentProductOrderMapper agentProductOrderMapper;

    @RequestMapping(value = "/createAgentPlaceOrder", method = RequestMethod.POST)
    int createAgentPlaceOrder(@RequestBody Map<String, Object> param){
        return  agentProductOrderMapper.createAgentPlaceOrder(param);
    }
    @RequestMapping(value = "/getPlaceOrderList", method = RequestMethod.POST)
    List<Map<String,Object>> getPlaceOrderList(@RequestParam("id") String id){
        return  agentProductOrderMapper.getPlaceOrderList(id);
    }

    @RequestMapping(value = "/updateAgentPlaceOrder", method = RequestMethod.POST)
    int updateAgentPlaceOrder(@RequestBody Map<String, Object> param){
        return  agentProductOrderMapper.updateAgentPlaceOrder(param);
    }
    @RequestMapping(value = "/getOrderInfo", method = RequestMethod.POST)
    Map<String,Object> getOrderInfo(@RequestParam("id") String id){
        return  agentProductOrderMapper.getOrderInfo(id);
    }
}
